<!--[if lte IE 9]>
    <p class="browsehappy">你正在使用<strong>过时</strong>的浏览器。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
      以获得更好的体验！</p>
    <![endif]-->
    <div class="am-topbar am-topbar-inverse admin-header"  style=" background-color: #222222;">
        <div class="am-topbar-brand">
            <strong>校园知事</strong><small>&nbsp;后台管理</small>
        </div>
        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
        <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
            <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
			<li class="am-dropdown" data-am-dropdown>
                    <a target="_blank"  href="/">
                        校园知事主页
                    </a>
                </li>
				 <li><a href="javascript:;"><span class="am-icon-envelope-o"></span> 收件箱 <span class="am-badge am-badge-warning">5</span></a></li>
                <li class="am-dropdown" data-am-dropdown>
                    <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
                        <span class="am-icon-users"></span> 管理员 <span class="am-icon-caret-down"></span>
                    </a>
                    <ul class="am-dropdown-content">
                        <li><a href="/admin/user/editself/{{.Id}}"><span class="am-icon-user"></span> 管理员资料</a></li>
                        <li><a href="/admin/user/pwd/{{.Id}}"><span class="am-icon-get-pocket"></span> 密码</a></li>
                        <li><a href="###" value="{{.Id}}" onclick="exit()" id="exit"><span class="am-icon-power-off"></span> 退出登录</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <div class="am-cf admin-main">
        <!-- sidebar start -->
        <div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
            <div class="am-offcanvas-bar admin-offcanvas-bar">

                <ul class="am-list admin-sidebar-list">
                    <!-- <li><a href="/admin"><span class="am-icon-file-image-o"></span> 轮播图</a></li> -->
                    <li><a href="/admin/article/add" ><span class="am-icon-pencil-square-o"></span> 添加新闻</a></li>
                     <li><a href="/admin/article" class="am-cf"><span class="am-icon-list-ol"></span> 新闻列表</a></li>

                     <li><a href="/admin/user" ><span class="am-icon-list-alt"></span> 管理员列表</a></li>
                     <li><a href="/admin/user/add"><span class="am-icon-user-plus"></span> 添加管理员</a></li>
                </ul>
                <div class="am-panel am-panel-default admin-sidebar-panel">
                    <div class="am-panel-bd">
                        <p><span class="am-icon-bookmark"></span> 文化精神</p>
                        <p>专业 专心 专注 专致   -跟踪资讯 聚焦多彩生活</p>
                    </div>
                </div>
                <div class="copy-lintul">
                    © Copyright 2016-
                    <script>var d = new Date(); document.write(d.getFullYear());</script><br />
                    &#38;&#38; Company link- <a target="_blank" href="https://toutiao.io/">XIAO YUAN ZHI SHI</a>
                </div>
            </div>
        </div>
        <!-- sidebar end -->
<script>
	function exit(){
		var $id=$("#exit");
		console.log($id.attr("value"));
		 $.lintul('/admin/user/exit',{id:$id.attr("value").trim()},function(data){
                 if (data.status === 1) {
                        layer.msg('注销成功', { offset: '15%', icon: 6 ,time:1000}, function () {
                            window.location.href="/";
                        });
                    } else {
                        layer.msg('退出失败,请检查后重试', { offset: '15%', icon: 5 });
                    }
            });
	}
</script>
